package cate.common.table.activity.exorcism.row;


import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("驱魔之夜-等级")
public class ExorcismLevelRow extends ERow {

    @NoteField("等级")
    public int level;

    @NoteField("配置ID")
    public int configTid;

    @NoteField("攻击")
    public long attack;

    @NoteField("攻击周期")
    public long attackCycle;

    @NoteField("升级消耗1")
    private String consumeStr1;

    @NoteField("升级消耗2")
    private String consumeStr2;

    @Override
    public void parse(XSSFRowWrap xr) {
        this.id = xr.getInteger("ID", 0);
        this.level = xr.getInteger("等级", 0);
        this.configTid = xr.getInteger("配置ID",0);
        this.attack = xr.getLong("攻击", 1L);
        this.attackCycle = xr.getLong("攻击周期",1000L);
        this.consumeStr1 = xr.getString("升级消耗1");
        this.consumeStr2 = xr.getString("升级消耗2");
    }


    public String getLevelUpConsume(byte type) {
        if (type == 1) {
            return consumeStr1;
        } else {
            return consumeStr2;
        }
    }


}
